<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: #999;
            border: 1px solid black;
            float: left;/*向左浮动*/
        }
    </style>
</head>
<body>
<h1>浮动</h1>
<div>
    <div class="box">1</div>
    <div class="box">2</div>
    <div class="box">3</div>
</div>
</body>
</html>